{extend name="public/base" /} {block name="body"}
<div class="ibox float-e-margins">
<div class="content-tabs">
	<ol class="breadcrumb">
		<li>
			<a href="{:url('index/index')}"><i class="fa fa-home"></i></a>
		</li>
		<li><strong>维权订单列表</strong></li>
	</ol>
</div>
	<div class="ibox-content">
		<form id="myForm" class="form-horizontal m-t" method="post" action="{:url('index')}">
		<div class="row">
					<div class="form-group">
						    &nbsp;&nbsp;&nbsp;&nbsp;
							订单号<input type="text" id="order_number" name="order_number" value="" placeholder="请输入订单号" class="bank" style="width: 130px;"/>
							商户名称<input type="text" id="store_name" name="store_name" value="" placeholder="请输入商户名称" class="bank"/>
                     			<select name="order_state" class="bank" style="width: 100px;">
                     				<option value="0">订单状态</option>
                                    <option value="1">待付款</option>
                                    <option value="2">拼团中</option>
                                    <option value="3">待发货</option>
                                    <option value="4">已发货</option>
                                    <option value="5">已完成</option>
                                    <option value="6">已关闭</option>
                               </select>
							下单时间<input id='start_time' name='start_time'  style="width: 110px;" onclick='WdatePicker()' type='text' placeholder="开始时间" class="bank" />
							<input id='end_time' name='end_time'  style="width: 110px;" onclick='WdatePicker()' type='text' placeholder="结束时间" class="bank" />
							收货人姓名<input type="text" id="receiver" name="receiver" value="" placeholder="请输入收货人姓名" class="bank" style="width: 130px;"/>
							手机号<input type="text" id="receiver_mobile" name="receiver_mobile" value="" placeholder="请输入收货人手机" class="bank" />
							<span class="bank"><button type="submit" class="btn btn-sm btn-primary"> 查询</button> </span>
					</div>              
        </div>
        </form>
		<div class="hr-line-dashed"></div>
            <div class="example-wrap">
                <div class="example">
                    <table class="table table-bordered table-hover">
                        <tbody id="list">
                        	{foreach name="list1" item='order'}
                        	<tr><td colspan="10">订单号:{$order.sn}<li class="fa fa-search" style="padding-left: 1200px"><a href="{:url('order/index')}"><strong>查看详情</a></strong></li></td></tr>
                        	 <tr class="long-tr">
	                        	<th>商品</th>	                        	
	                        	<th>商户</th>
	                            <th>单价/数量</th>
	                            <th>栏目</th>
	                            <th>用户支付</th>
	                            <th>退款/退货</th>
								<th>买家</th>
	                            <th>下单时间</th>
	                            <th>订单状态</th>
	                            <th>实付金额</th>
	                        </tr>
                        	{foreach name="order['items']" item="ad" key="k" }
                        	<tr>
                        		<td><img src="{$ad.thumb}"  width="50px"/>{$ad.goods_name}</td>
                        		<td>{$order.store_name}</td>
                        		<td>{$ad.price}<br>{$ad.number}(件)</td>
                        		<td>
                        			{if $ad.goods_lanmu==1}
                        			疯狂抢
                        			{elseif $ad.goods_lanmu==2}
                        			优惠购
                        			{elseif $ad.goods_lanmu==3}
                        			赚积分
                        			{elseif $ad.goods_lanmu==4}
                        			云拼团
                        			{/if}
                        		</td>
                        		<td>{$ad.total_price}</td>
                        		<td>退款成功</td>
                        		<td>{$order.nick_name}</td>
                        		<td>{$ad.add_time}</td>
                        		{if condition="$k==0"}
                        			<td rowspan="<?php echo count($order['items']) ?>">{if $order.order_state==1}
                        			待付款
                        			{elseif $order.order_state==2}
                        			拼团中
                        			{elseif $order.order_state==3}
                        			待发货
                        			{elseif $order.order_state==4}
                        			已发货
                        			{elseif $order.order_state==5}
                        			已完成
                        			{elseif $order.order_state==6}
                        			已关闭
                        			{/if}
                        			</td>
                        			<td rowspan="<?php echo count($order['items']) ?>">
                        			{$order.pay_price}
                        			</td>
                        		{/if}
                        	</tr>
                        	{/foreach}
                        	{/foreach}
                        </tbody>
                    </table>
                    <div style="text-align: right;">
                      {$list->render()}
                    </div>
                </div>
            </div>
        </div>
</div>
{/block} {block name="script"}
<script src="__JS__/jquery.form.js"></script>
<script src="__LIB__/validate/jquery.validate.min.js"></script>
<script src="__LIB__/validate/messages_zh.min.js"></script>
<script src="__LIB__/validate/add_validate.min.js"></script>
<script src="__LIB__/fileinput/js/fileinput.min.js"></script>
<script src="__LIB__/fileinput/js/locales/zh.js"></script>
<script src="__LIB__/datepicker/WdatePicker.js"></script>
<script>
</script>
<style>
.bank{
	width: 150px;
    height:30px;
    text-align:center;
    border-radius:5px;
}
</style>
{/block}